<?php

/*
 * admin.php - 
 * 
 * Add a question.
 * etc., Just the admin stuff.
 * */

	require_once('./functions.php');


	if ( isset( $_GET['action'] ) ) {
		$action = $_GET['action'];
		process_action ( $action );
		exit;
	}
	
	get_header();
	
	echo ' <div class="container">';

	global $actions;
	global $actions_text;
	global $actions_description; 

	echo '<div class="actions">';

	foreach ( $actions as $i => $action ) {
		$css_class = ( $i == count($actions) - 1 ) ? "action last" : "action"; 

		printf( "<div class='$css_class'> <a href='%s?action=%s' title='%s'> %s </a> </div>", 
				$_SERVER['PHP_SELF'], $actions[$i], $actions_description[$i], $actions_text[$i] 
		);
	}

	echo  '</div> <!--close of class="actions"-->';
	echo '<div class="ia"></div>';
	
	get_footer(); 
?>